package com.yimils.core.sys.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yimils.core.sys.entity.UserRoleEntity;
import org.apache.ibatis.annotations.Select;

public interface UserRoleMapper extends BaseMapper<UserRoleEntity> {

    @Select("SELECT roleId FROM user_role where userId = #{userId} ORDER BY roleId ASC LIMIT 1")
    Long getHighestRoleId(Long userId);
}
